#!/usr/bin/env perl

use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/gen-perl/";

use lib './gen-perl';
use Thrift;
use Thrift::BinaryProtocol;
use Thrift::BufferedTransport;
use Thrift::Socket;
use Throomie;

my $transport = Thrift::Socket->new('localhost', 9090);
my $client = ThroomieClient->new( Thrift::BinaryProtocol->new(Thrift::BufferedTransport->new($transport)) );
$transport->open();
my $classNames = "hoge";
$client->beginMakingModel($classNames);
my $cnt = 0;
while (my $line = <>){
    print "$cnt\n";
    chomp $line;
    $client->addTraining($line);
    $cnt++;
}
$client->endMakingModel();
$transport->close();




